import { useState } from "react";

export const UseStateDemo = () => {
  const [count, setCount] = useState(0)

  return (
    <>
      <h1>useState的使用</h1>
      <h3>计数: {count}</h3>
      <button onClick={() => setCount(count + 1)}>+1</button>
    </>
  )
}